import request from '@/config/request'

export interface LoginParams {
  username: string
  password: string
  captchaVerification: string
}

/**
 * 登录
 */
export const login = (data: LoginParams) => {
  return request.post({ url: '/system/auth/login', data })
}

/**
 * 退出登录
 */
export const logout = () => {
  return request.post({ url: '/system/auth/logout' })
}

/**
 * 获取用户登录信息
 */
export const userLoginProfile = () => {
  return request.get({ url: '/system/auth/user/profile' })
}
